Repository navigation
Host fine-tuned checkpoints on the HF Hub (D14) + evaluate.py --methods - #4
Open
seanmcgowanx wants to merge 1 commit into
Open
seanmcgowanx wants to merge 1 commit into
seanmcgowanx wants to merge 1 commit into
Conversation
…-methods - scripts/upload_checkpoints.py pushes each run's best weights, config, metrics and summary (never last_state.pt) plus a model card to one team HF repo - download_models.py fetches those runs into $AAI521_DATA_ROOT/checkpoints (--finetuned/--no-finetuned), pinned to finetuned.revision in models.yaml - config: FinetunedSpec and train_run_names() as the single source of run folder names - evaluate.py --methods: rerun a subset of denoise_inpaint methods and merge the rows into the existing CSV, so the fine-tuned rows can be added without redoing zero-shot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why (D14)
Fine-tuned weights only existed on the machine that trained them, so the web app and
evaluate.pysilently fell back to pretrained weights for anyone else, and a grader cloning the repo couldn't reproduce the fine-tuned rows. The weights (~1 GB, mostly DDColor-L) are too big for git.What
aai521-group3/aai521-restoration-checkpoints), one folder per training run mirroring$AAI521_DATA_ROOT/checkpoints/<run_name>/. Pinned inconfigs/models.yaml(finetuned.revision: cef1c87…) so later uploads can't change reported results.scripts/upload_checkpoints.py: pushesbest.safetensors/best_lora/,config.json,metrics.csv,summary.json+ a generated model card in one commit. Never uploadslast_state.pt.--tasks inpaintswaps in a single run (e.g. a better LoRA).scripts/download_models.py: now also fetches the runs into the checkpoint root (--no-finetunedto skip;--models --finetunedfor fine-tuned only). No loader code changed: the pipeline's existing<run_name>/best.safetensorslookup picks them up.config.train_run_names(): run folder names come fromconfigs/train/<task>.yaml, the same source the pipeline uses.scripts/evaluate.py --methods: fordenoise_inpaint, run only methods whose name contains the given string(s) and merge them into the existing CSV (replacing rows for those methods). Lets us add the fine-tuned BOPBtL rows (~2.4 h on MPS) without rerunning the zero-shot ones. Assumes the same--seed/--inpaint-limitas the existing CSV.Verified
make test(94 passed),make lint(ruff + mypy clean)AAI521_DATA_ROOT=/tmp/hfcheck python scripts/download_models.py --models --finetuned→ all 4 runs (996 MB); SHA-256 of every weight file matches the trainer's local copiesRestorationPipelineloads all four tasks asfine-tuned (<run>)Note: per D11 the inpaint LoRA is the step-0 adapter (identical to pretrained SD), so it's hosted for completeness, not because it changes outputs.